package com.eva.biz.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author Caesar Liu
 * @date 2022-03-16 16:07
 */
@Data
@ApiModel("触发任务参数")
public class TriggerJobDTO {

    @NotNull(message = "任务ID不能为空")
    private Integer id;

    @NotNull(message = "业务时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date businessTime;

    // 预计执行时间
    private Date scheduledFireTime;

    // 实际执行时间
    private Date fireTime;

    // 预计下次执行时间
    private Date nextFireTime;

    @NotNull(message = "触发类型")
    private String triggerType;
}
